/*
 * @Author: Guojian Wang 1085844536@qq.com
 * @Date: 2022-12-17 20:54:45
 * @LastEditTime: 2022-12-17 22:58:59
 * @LastEditors: Guojian Wang 1085844536@qq.com
 * @FilePath: \CloundMusic\pages\other\other.js
 * @Description:
 */
import request from '../../../utils/request';

Page({
    /**
     * 页面的初始数据
     */
    data: {
        person: {
            username: 'curry',
            age: 33,
        },
    },

    /**
     * 获取用户 openId 的回调
     */
    handleGetOpenId() {
        // 1.获取登录凭证
        wx.login({
            success: async (res) => {
                let code = res.code;
                // 2.将登录凭证发送服务器
                let result = await request('/getOpenId', { code });
                console.log(result);
            },
        });
    },

    onLoad(options) {},

    onReady() {},

    onShow() {},

    onHide() {},

    onUnload() {},

    onShareAppMessage() {},
});
